const imgList = document.querySelectorAll('img');
window.addEventListener('scroll', (e) => {
    imgList.forEach(img => {
        const imgTop = img.getBoundingClientRect().top;
        if (imgTop < window.innerHeight) {
            const data_src = img.getAttribute('data-src');
            img.setAttribute('src', data_src);
        }
    });
    console.log('触发了scroll');
});